import React from 'react'
import { NavContent, Link } from '../../ui-components'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import * as teamAction from '../../actions/team.action'
import { clearAtList, fetchAtList } from '../../actions/home.action'
import { updateAvatar, fetchAddresses } from '../../actions/app.action'
import { fetchRole, delStaff, createDocument, updateOnboardingFlowStatus } from '../../actions/onboarding.hr.action'
import { fileUpload } from '../../actions/file.action'
import * as userAction from '../../actions/user.action'
import {ROOT_TEAM} from '../../constants'

//const ROOT_TEAM = '2b1e6d025ac28868'
import MyTeam from './MyTeam';

export default
@connect(({app}) => ({app}), dispatch => ({actions: bindActionCreators({...teamAction, ...userAction, clearAtList, fetchAtList, updateAvatar, fetchAddresses, createDocument, fileUpload, updateOnboardingFlowStatus, delStaff, fetchRole }, dispatch)}))
class Team extends React.Component {

	static contextTypes = {
		router: React.PropTypes.object
	}

  render() {
    return (
      <MyTeam
        {...this.props}
				{...this.props.actions}
				{...this.context}
      />
    )
  }
}
